home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 49
/
Aminet 49 (2002)(GTI - Schatztruhe)[!][Jun 2002].iso
/
Aminet
/
util
/
boot
/
WBSP_Prefs.lha
/
WBStartup+Prefs
/
Source
/
GetStringWindow.c
< prev
next >
Wrap
C/C++ Source or Header
|
2002-03-05
|
1KB
|
37 lines
#include <exec/types.h>
#include <libraries/mui.h>
#include <string.h>
#include <proto/dos.h>
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/muimaster.h>
#include "WBStartup+Prefs.h"
void GetStringWindow(char *windowtitle,WORD len)
{
/* char *windowtitle The title of the window */
/* WORD len The # of characters in buffer, including the added NULL */
swinobj=MUI_NewObject("Window.mui",MUIA_Window_Title,windowtitle,
MUIA_Window_RefWindow,winobj,
MUIA_Window_LeftEdge,MUIV_Window_LeftEdge_Centered,
MUIA_Window_TopEdge,MUIV_Window_TopEdge_Centered,
MUIA_Window_RootObject,
MUI_NewObject("Group.mui",MUIA_Group_Child,
strobj=MUI_NewObject("String.mui",MUIA_String_MaxLen,(LONG)len,
MUIA_Frame,MUIV_Frame_String,
TAG_DONE),
TAG_DONE),
TAG_DONE);
if (swinobj)
{
SetAttrs(winobj,MUIA_Window_Sleep,TRUE,TAG_DONE);
DoMethod(appobj,OM_ADDMEMBER,swinobj);
DoMethod(swinobj,MUIM_Notify,MUIA_Window_CloseRequest,TRUE,appobj,2,MUIM_Application_ReturnID,6);
DoMethod(strobj,MUIM_Notify,MUIA_String_Acknowledge,MUIV_EveryTime,appobj,2,MUIM_Application_ReturnID,5);
SetAttrs(swinobj,MUIA_Window_Open,TRUE,MUIA_Window_ActiveObject,strobj,TAG_DONE);
}
}